package org.dromara.wms.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.mybatis.core.domain.BaseEntity;

import java.io.Serial;

/**
 * 仓储作业类别表对象 wms_order_type
 * @author wenrui
 * @date 2024-03-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("wms_order_type")
public class WmsOrderType extends BaseEntity {

  @Serial
  private static final long serialVersionUID = 1L;

  @NotNull(message = "作业编号不能为空", groups = {EditGroup.class})
  @ExcelProperty(value = "作业编号")
  @TableId(value = "type_id")
  private Long typeId;

  @NotBlank(message = "名称不能为空", groups = {AddGroup.class, EditGroup.class})
  @ExcelProperty(value = "名称")
  private String name;

  @ExcelProperty(value = "下步单据类别")
  private Integer nextId;

  @ExcelProperty(value = "退回单据类别")
  private Integer backId;

  @NotBlank(message = "作业类型id不能为空", groups = {AddGroup.class, EditGroup.class})
  @ExcelProperty(value = "作业类型id")
  private Long fmsTypeId;

  @NotBlank(message = "作业类型库存不能为空", groups = {AddGroup.class, EditGroup.class})
  @ExcelProperty(value = "作业类型", converter = ExcelDictConvert.class)
  @ExcelDictFormat(dictType = "wms_type")
  private String wmsType;

//  作废 2024年8月7日, PM 02:05:36 suwr99
//  @NotBlank(message = "财务类型库存不能为空", groups = {AddGroup.class, EditGroup.class})
//  @ExcelProperty(value = "财务类型", converter = ExcelDictConvert.class)
//  @ExcelDictFormat(dictType = "fms_type")
//  private String fmsType;

  @ExcelProperty(value = "财务记账科目")
  private String classificationCode;

  @NotBlank(message = "状态不能为空", groups = {AddGroup.class, EditGroup.class})
  @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
  @ExcelDictFormat(dictType = "sys_status")
  private String status;

  @ExcelProperty(value = "审批流程")
  private Long workflowId;


}
